<ion-content>
  <ion-list inset>
    <div class="title-box">
      <div>
        <img src="../../assets/imgs/logo_b.png">
      </div>
    </div>

    <form [formGroup]="group" novalidate autocomplete="off">
    <ion-item>
      <ion-label>
        <ion-icon name="person" class="hst-color" item-start></ion-icon>
      </ion-label>
      <ion-input type="text" clearInput="true" placeholder="{{'usernameTips' | translate}}" formControlName="username"></ion-input>
    </ion-item>

    <ion-item>
      <ion-label>
        <ion-icon name="lock" class="hst-color" item-start></ion-icon>
      </ion-label>
      <ion-input *ngIf="!showPassword" clearInput="true" placeholder="{{'passwordTips' | translate}}" type="password" formControlName="password"></ion-input>
      <ion-input *ngIf="showPassword" clearInput="true" placeholder="{{'passwordTips' | translate}}" type="text" formControlName="password"></ion-input>
      <button icon-only ion-button clear [color]="showPassword ? 'calm' : 'dark'" type="button" item-right (click)="showPassword = !showPassword">
        <ion-icon name="eye"></ion-icon>
      </button>
    </ion-item>
    </form>

    <button class="login-btn" ion-button full color="success" (click)="login()" [disabled]="group.invalid">{{"login" | translate}}</button>
  </ion-list>
</ion-content>
